x86/hvm: Fix memory leaks in hvm_copy_context_and_params()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Sat, 16 May 2020 12:10:07 +0000 (13:10 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 18 May 2020 14:22:53 +0000 (15:22 +0100)
commit3d6e92e309987c9e33177c9ccd155e58dbd5d0db
tree7508d8327d89a30e30d80a247cdeeb0c5e4ceb5c
parent664e1bc12f8658da124a4eff7a8f16da073bd47f
x86/hvm: Fix memory leaks in hvm_copy_context_and_params()

Any error from hvm_save() or hvm_set_param() leaks the c.data allocation.

Spotted by Coverity.

Fixes: 353744830 "x86/hvm: introduce hvm_copy_context_and_params"
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/hvm.c